This application is related to Japanese Patent Application No. HEI 11(1999)-086312 filed on Mar. 29, 1999, whose priority is claimed under 35 USC xc2xa7119, the disclosure of which is incorporated by reference in its entirety.
1. Field of the Invention
The present invention relates to a semiconductor device for display control, and more particularly to a semiconductor device for display control for generating bit-mapped display data to be given to a liquid crystal driving device for displaying characters, graphics and the like on a liquid crystal display.
2. Description of the Related Art
FIG. 15 is a block diagram showing the structure of a device necessary for displaying characters and the like according to the prior art.
In general, the above-mentioned device comprises a liquid crystal display 101 for displaying characters and the like, a liquid crystal driving device 102 for controlling the display of characters and the like, a ROM 104 for font data storage in which font data is stored for each character, a RAM 103 for temporary storage of font data in which font data to be displayed is temporarily stored and a CPU 105.
An operation of displaying a character according to the prior art will be described below.
First of all, the CPU 105 operates to specify a character code to be displayed. In some cases, the character code is generated by a program processing or is prestored in a memory such as a RAM, a ROM or the like depending on the need. In general, the character code is defined for each character, and is defined as a shift JIS code or a JIS code in Japanese.
The CPU 105 utilizes special software to calculate a character storage address in the ROM 104 for font data storage in which font data corresponding to a specified character code is stored. In order to calculate the character storage address from the character code, a xe2x80x9ccharacter code-character storage address conversion tablexe2x80x9d shown in FIGS. 23 and 24 is used. For example, while the smallest character code of the JIS code is xe2x80x9c2120xe2x80x9d in a hexadecimal number, the smallest address of the ROM 104 for font data storage is xe2x80x9c0xe2x80x9d. A corresponding relationship between the code and the address is described in the conversion table so that conversion from xe2x80x9c2120xe2x80x9d to xe2x80x9c0xe2x80x9d can be easily carried out.
FIG. 16 shows input and output terminals of the ROM 104 for font data storage. When addresses (A0 to A17) are input to the input terminal, corresponding font data is output to output terminals (D0 to D15).
FIG. 17 illustrates an example of the storage of font data of a 16-dot size character. A Chinese character (one element of Japanese writing system)  shown in a size of 16xc3x9716 dots.
FIGS. 23 and 24 show a character code-character storage address conversion table in the ROM 104 for font data storage illustrated in FIG. 16.
The CPU 105 gives a calculated character storage address to the ROM 104 for font data storage. Then the CPU 105 reads font data output from the ROM 104 for font data storage and stores the font data in the RAM 103 for temporary storage of font data.
The CPU 105 repeats the above-mentioned processings to store all font data for one screen display on a liquid crystal screen in the RAM 103 for temporary storage of font data. Then, the CPU 105 transfers the data stored in the RAM 103 for temporary storage of font data to the liquid crystal driving device 102, and gives a display position and the like on the liquid crystal display 101. The liquid crystal driving device 102 to which these data are transferred carries out a processing of displaying the character of a character code transferred to the liquid crystal display 101. FIG. 20 shows a flowchart for the above-mentioned character display processing according to the prior art (S101 to S107).
Japanese Unexamined Patent Publication No. HEI 4(1992)-294418 discloses a font pattern transfer LSI provided with a character generator wherein a character code is converted to a physical address of the character generator using an address conversion table ROM.
As described above, a character corresponding to a specified character code has conventionally been displayed. However, the font data stored in the ROM 104 for font data storage cannot be directly given to the liquid crystal driving device 102 depending on the combination of the input bus width of the liquid crystal driving device 102 and the size of the font data. Therefore, it has been necessary to carry out a processing of first expanding the font data stored in the ROM 104 for font data storage into the RAM 103 for temporary storage and then giving the expanded data to the liquid crystal driving device 102. The CPU 105 has carried out almost all of a series of processings. The details of the processing will be described below.
FIG. 18 illustrates the storage of font data of a 12-dot size character in the ROM 104 for font data storage.
In the case where a character string to be displayed on the liquid crystal display 101 has two Chinese characters of  and  the character codes thereof are given with JIS codes of xe2x80x9c3441xe2x80x9d and xe2x80x9c3B7Axe2x80x9d, and with shift JIS codes of xe2x80x9c8ABFxe2x80x9d and xe2x80x9c8E9Axe2x80x9d.
The CPU 105 calculates the character storage address of the ROM 104 for font data storage from the character code by referring to the character code-character storage address conversion table shown in FIG. 23 or FIG. 24.
First, the first character of  of the character string will be mentioned. FIG. 25 illustrates a relationship between a display RAM for the Chinese character of  provided in the liquid crystal driving device 102 and a screen display actually displayed on the liquid crystal display 101.
As shown in FIG. 25, the relationship between the screen display of the liquid crystal display 101 and the contents of the display RAM provided in the liquid crystal driving device 102 assumes one-to-one correspondence. Thus, the data written into the display RAM is exactly displayed on the screen of the liquid crystal display 101.
If input data have a width of 8 bits, one address of the display RAM provided in the liquid crystal driving device 102 has an 8-bit structure. For example, a write unit in an X direction is 8 bits and data having 8 bits is given to the display RAM to write actual data. Accordingly, if the data input width of the liquid crystal driving device 102 has 8 bits, the CPU 105 should input character data to the liquid crystal driving device 102 twice in the X direction and twelve times in the Y direction of the liquid crystal screen. As a result of the above character data input, the character of  is displayed on the liquid crystal screen as shown in FIG. 22.
FIG. 19 illustrates an example of the storage of font data on the second Chinese character of  having a 12-dot size. In the case where the second character of  is to be displayed on the right side of the first character of  a space of five dots (a region xe2x80x9caxe2x80x9d in FIG. 26) is formed between the two characters as shown in FIG. 26.
More specifically, although the character data itself has a 12-dot size, an escapement width is restricted by the bit width or the like of the data input to the liquid crystal driving device 102.
Conventionally, the character data has been once stored in the RAM 103 for temporary storage of font data to determine the escapement width irrespective of the data input width of the liquid crystal driving device 102, and then the CPU 105 has carried out a processing of adjusting a bit position or the like in the RAM 103 for temporary storage as described above.
Moreover, the font data has been transferred to the liquid crystal driving device 102 not in a character unit but as pixel data (that is, data for each dot). In order to display a character on the liquid crystal display 101, the CPU 105 needs to calculate a font data storage address from a given character code, give the calculated address to the ROM 104 for font data storage and transfer character data corresponding to the address to the RAM 103 for temporary storage for each character. After all data for one screen is transferred to the RAM 103 for temporary storage, the CPU 105 transfers the data from the RAM 103 for temporary storage to the liquid crystal driving device 102.
However, an excessive load has been imposed on the CPU 105 to execute all of a series of display processings. Further, there has been a problem in that a delay is caused on the execution of other processings than the display processing during the execution of the display processing on the liquid crystal screen. Moreover, since the above-mentioned series of display processings are executed in software, they are very complicated.
Further, an additional processing for easy viewing is executed such as displaying a plurality of characters having 10 different font sizes on the same screen. In this case, a more complicated processing should be executed. The number of times that the CPU 105 gives access to the ROM 104 for font data storage, the RAM 103 for temporary storage and the like is increased more greatly than in the case where fonts having the same size are processed. Consequently, a load on the CPU 105 is very large.
On the other hand, character data having a 12-dot size is stored in the ROM 104 for font data storage in the form as shown in FIGS. 18 and 19 as described above. However, a dead region is usually present.
As shown in FIG. 16, a 16-bit width is usually utilized as a bus width for the data output of the ROM 104 for font storage in order to have versatility. However, a region xe2x80x9caxe2x80x9d shown in FIG. 18 is a dead storage region and an 8-bit bus width also causes such a dead storage region. In general, as long as a bus width is a multiple of eight, a dead storage region is generated.
Moreover, as shown in FIG. 18, a region xe2x80x9cbxe2x80x9d consisting of lower four dots acts as a dead storage region so that a head address where each character is to be stored can be easily calculated from a character code. The reason is that character data has conventionally been output from the ROM 104 for font data storage based on a processing flow shown in FIG. 21.
Hereinafter, description will be given to the details of a conventional address calculation and processing of outputting character data as shown in FIG. 21.
A character storage address obtained from the character code-character storage address conversion table shown in FIG. 23 will be hereinafter referred to as a xe2x80x9ccharacter address-1xe2x80x9d. The character address-1 corresponds to addresses of A4 to A17 shown in FIG. 18.
An address common to all characters will be referred to as a xe2x80x9cscan addressxe2x80x9d. The scan address corresponds to addresses of A0 to A3 shown in FIG. 21.
The xe2x80x9ccharacter address-1xe2x80x9d is generated in the following manner (Steps S111 and S112). In the case where a JIS code is used as a character code, the JIS code of the Chinese character of  is xe2x80x9c3441xe2x80x9d in a hexadecimal number which has first and second bytes of xe2x80x9c34xe2x80x9d and xe2x80x9c41xe2x80x9d expressed in the hexadecimal number, respectively.
In this case, the first byte of the JIS code is present between xe2x80x9c30xe2x80x9d and xe2x80x9c41xe2x80x9d expressed in the hexadecimal number. Therefore, a conversion table of (1)-(b) shown in FIG. 23 is used. The first byte of xe2x80x9c34xe2x80x9d is xe2x80x9c0110100xe2x80x9d expressed in a 7-bit binary number, which means b16=b15=b13=1 and b17=b14=b12=b11=0.
According to the conversion table of (1)-(b) shown in FIG. 23, b17=A15, b14=A14, b13=A13, b12=A12 and b11=A11 are obtained. According to the conversion table, consequently, A15=0, A14=0, A13=1, A12=0 and A11=0 are obtained.
Similarly, the second byte of xe2x80x9c41xe2x80x9d is xe2x80x9c1000001xe2x80x9d expressed in a 7-bit binary number, which means b27=b21=1 and b26=b25=b24=b23=b22=0. On the other hand, according to the conversion table of (1)-(b), b27=A10, b26=A9, b25=A8, b24=A7, b23=A6, b22=A5 and b21=A4 are obtained. Therefore, A10=1, A9=0, A8=0, A7=0, A6=0, A5=0 and A4=1 are obtained.
Moreover, the conversion table of (1)-(b) shows A17=A16=0. Therefore, the character address-1 is represented by A17 to A4=(0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1) in a binary number, and by 241 in a hexadecimal number (Steps S113 and S114). When the character address-1 is given to the ROM 104 for font data storage and the scan address is sequentially incremented, the character data are sequentially output from the output terminals D0 to D15) of the ROM 104 for font data storage (Steps S115, S116 and S117).
In the case of the character data of z,1  in FIG. 18, an address represented by the combination of a character address-1 indicated as A17 to A4 and a scan address (A0 to A3) is expressed as xe2x80x9c2410xe2x80x9d, xe2x80x9c2411xe2x80x9d, xe2x80x9c2412xe2x80x9d,. . . , xe2x80x9c241Fxe2x80x9d in a hexadecimal number. When the address starting with xe2x80x9c2410xe2x80x9d is sequentially input to the ROM 104 for font data storage, the bit data of the character data is output to the output terminals D0 to D15 in response to the input address.
More specifically, when the address of xe2x80x9c2410xe2x80x9d is input, xe2x80x9c0000xe2x80x9d is output as data (D0 to D15) for the first row in FIG. 18 because of (A3, A2, A1, A0)=(0, 0, 0, 0). When the address of xe2x80x9c2411xe2x80x9d is input, xe2x80x9c4220xe2x80x9d is output as data (D0 to D15) for the second row because of (A3, A2, A1, A0)=(0, 0, 0, 1). When the address of xe2x80x9c2412xe2x80x9d is input, data (D0 to D15) xe2x80x9c27F0xe2x80x9d for the third row is output because of (A3, A2, A1, A0)=(0, 0, 1, 0). In the following, the bit data of the character data of  is sequentially output in the same manner.
Thus, the character having a 12-dot size shown in FIG. 18 requires the volume of data per one character smaller than a character having a 16-dot size. However, an address space is represented by 16 bits determined by the character address-1 and the scan address. Therefore, the same data volume required by the character font having a 16-dot size should be stored as the volume of data stored in the ROM 104 for font data storage.
For example, a data volume of 12xc3x9712=144 bits is required per one character for the character font having a 12-dot size, while a data volume of 16xc3x9716=256 bits is required per one character for the character font having a 16-dot size.
Accordingly, also in the case where the data of the character having a 12-dot size is to be stored in the ROM 104 for font data storage, a storage region which is as large as the storage region for the data of the character having a 16-dot size is required. Therefore, the chip size of the ROM 104 for font data storage is increased.
Further, in addition to a connection between the CPU 105 and the liquid crystal driver 102, a connection of the CPU 105 and the liquid crystal driving device 102 with the ROM 104 for font data storage and the RAM 103 for temporary storage of font data is required as shown in FIG. 15. However, the number of the input and output terminals is great and a large number of addresses and data wirings are required for these connections. Therefore, it is necessary to increase an area where these chips are to be mounted.- That is, it is difficult to reduce the size of the whole device in the structure shown in FIG. 15.
The present invention provides a semiconductor device for display control comprising an input section for receiving a display information including a character code, a display position information and a character size information, a first address generating section for generating a first address group corresponding to the received character code by applying a predetermined conversion rule to the received character code and character size information, a font data storing section for prestoring font data corresponding to the character data in a region specified by the first address group and outputting the font data stored in the region specified by the first address group when the first address group is given, a second address generating section for generating a second address group by utilizing the received display position information, the second address group representing a region where the font data output from the font data storing section is to be expanded, a font data expanding section for expanding and temporarily storing the font data output from the font data storing section in the region represented by the second address group generated by the second address generating section, and an output section for outputting the font data stored in the font data expanding section to an external display driving unit.
Consequently, the load on a CPU for a screen display processing can be decreased, the size of a circuit structure necessary for display can be reduced and a display processing program can be simplified.